<section class="scrollable padder-md" data-ng-controller="AdminUserEditController">
    <div class="m-b-md">
        <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
            <i class="fa fa-reply"></i>
        </a>
        <h3 class="m-b-none text-black">
            <i class="fa fa-edit m-r-sm"></i>
            管理员编辑- {{user.username || '新增'}}
        </h3>
    </div>

    <section class="panel panel-default">
        <div class="panel-body">
            <form class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        登录名：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="user.username"
                               data-ng-disabled="user.id != undefind" required/>
                    </div>
                </div>
                <div class="form-group" data-ng-if="user.id">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        默认密码：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">123456</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        电话：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="user.tel"
                               onkeydown="return onlyNum(event);"
                               onkeyup="this.value=this.value.replace(/[\u4e00-\u9fa5]|[(~！@#￥%…&*（）—=·+{}：“《》？、。，‘’；】【\-)+]/g,'')"
                               onpaste="return false" ondrop="return false" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        邮箱：
                    </label>
                    <div class="col-md-8">
                        <input type="email" class="form-control" data-ng-model="user.mail" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        所属角色组：
                    </label>
                    <div class="col-md-8">
                        <select title="所属角色组"
                                class="form-control"
                                data-ng-model="user.role.name"
                                data-ng-options="adminRole.name as adminRole.displayName for adminRole in adminRoleList">
                            <option value="">--选择角色--</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        状态：
                    </label>

                    <div class="col-md-8">
                        <label class="switch pull-left m-r-sm">
                            <input type="checkbox" data-ng-model="user.enable"
                                   data-ng-true-value="true" data-ng-false-value="false"
                                   data-ng-checked="user.enable==true">
                            <span></span>
                        </label>
                    </div>
                </div>

                <!-- 按钮 -->
                <div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">
                    <button type="button" class="btn btn-default" data-ng-click="close()">
                        <i class="i i-arrow"></i>
                        &nbsp;返回
                    </button>
                    <button type="submit" class="btn btn-success" data-ng-click="saveObj()">
                        <i class="fa fa-save"></i>
                        &nbsp;保存
                    </button>
                </div>
            </form>
        </div>
    </section>
</section>
